﻿using BCEntity.MySql.MaterialConfiguration;
using System;
using System.Collections.Generic;
using System.Text;

namespace BCData.MySql.MaterialConfiguration
{
    /// <summary>
    /// 素材信息处理
    /// </summary>
    public interface IMaterialConfigurationData
    {

        /// <summary>
        /// 检查素材信息
        /// </summary>
        /// <param name="materialName">素材名称</param>
        /// <returns></returns>
        bool Exists(string materialName);

        /// <summary>
        /// 检查素材信息
        /// </summary>
        /// <param name="materialConfigurationId">素材ID</param>
        /// <returns></returns>
        bool Exists(int materialConfigurationId);

        /// <summary>
        /// 创建素材信息
        /// </summary>
        /// <param name="materialConfigurationEntity">素材信息模型</param>
        /// <returns></returns>
        MaterialConfigurationEntity Create(MaterialConfigurationEntity materialConfigurationEntity);

        /// <summary>
        /// 删除素材信息
        /// </summary>
        /// <param name="materialConfigurationId">素材ID</param>
        /// <returns></returns>
        int Delete(int materialConfigurationId);

        /// <summary>
        /// 修改素材信息
        /// </summary>
        /// <param name="materialConfigurationEntity">素材信息模型</param>
        /// <returns></returns>
        MaterialConfigurationEntity Update(MaterialConfigurationEntity materialConfigurationEntity);

        /// <summary>
        /// 获取一条素材信息
        /// </summary>
        /// <param name="materialConfigurationId">素材Id</param>
        /// <returns></returns>
        MaterialConfigurationEntity Get(int materialConfigurationId);
        /// <summary>
        /// 获取一条素材信息
        /// </summary>
        /// <param name="searchKey">字典对应Key</param>
        /// <returns></returns>
        MaterialConfigurationEntity Get(string searchKey);
        /// <summary>
        /// 获取素材信息列表
        /// </summary>
        /// <param name="materialName">素材名称</param>
        /// <param name="materialType">素材类型</param>
        /// <param name="remark">素材备注</param> 
        /// <param name="usageGroupCode">用途组编码</param> 
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="ascending">是否升序</param>
        /// <param name="dataCount">数据条数</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">当前页大小</param>
        /// <returns></returns>
        IEnumerable<MaterialConfigurationEntity> List(string materialName,string materialType,string remark, string usageGroupCode, DateTime? start, DateTime? end, bool? ascending, out int dataCount, int pageIndex = 1, int pageSize = 10);
    }
}
